package com.forum.service.talk;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.entity.ApiResult;
import com.common.vo.PostsDetailVo;
import com.common.vo.RecommendTalkInfoVo;
import com.forum.param.PostsQueryParam;
import com.forum.pojo.talk.TalkPosts;

import java.util.List;
import java.util.Map;


/**
 * @author Tsing
 */
public interface TalkPostsService extends IService<TalkPosts> {

    /**
     * 创建帖子
     * @return ApiResult
     * @param posts
     * **/
    ApiResult<String> createPosts(TalkPosts posts);

    /**
     * 获取指定论坛的帖子
     * @return ApiResult
     * @param queryParam
     * **/
    ApiResult<Map<String, Object>> getPostsByTalk(PostsQueryParam queryParam);

    /**
     * 获取帖子详情
     * @return ApiResult
     * @param postId
     * **/
    ApiResult<PostsDetailVo> getPostDetail(Integer postId);

    /**
     * 获取推荐的帖子
     * @return ApiResult<List<RecommendTalkInfoVo></>></>
     */
    ApiResult<List<RecommendTalkInfoVo>> getRecommendPost();

}
